<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h2>Essential Links{{$store.state.count}}</h2>
      <template>
          <el-radio v-model="radio" label="1">{{$t('login.account')}}</el-radio>
          <el-radio v-model="radio" label="2">{{$t('login.password')}}</el-radio>
      </template>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      radio: '1'
    }
  },
  created () {
    this.test()
  },
  methods: {
    async test () {
      const { success, code, message, data } = await this.$api.getErrcode()
      if (success) {
        console.log(data)
        this.message.success(this.$t('errorCode.' + code))
      } else {
        this.message.error(message)
      }
    }
  }
}
</script>

<style scoped lang="scss">
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
